import { defHttp } from "/@/utils/http/axios"
import { Modal } from "ant-design-vue"
import { ConfigEnum } from "/@/enums/httpEnum"
import { useGlobSetting } from "/@/hooks/setting"
const globSetting = useGlobSetting()

export const deployApp = (params) => {
  return defHttp.post({ url: "/iam-service/app/deployApp", params}, { joinParamsToUrl: true })
}

export const offlineApp = (params) => {
  return defHttp.post({ url: "/iam-service/app/offlineApp", params}, { joinParamsToUrl: true })
}

export const getPublicConfig = (params) => {
  return defHttp.get({ url: "/iam-service/app/publicConfig", params})
}


export const pageApp = (params) => {
  return defHttp.get({ url: "/iam-service/app/pageApp", params})
}

export const getApp = (params) => {
  return defHttp.get({ url: "/iam-service/app/getApp", params})
}

export const updateApp = (params) => {
  return defHttp.post({ url: "/iam-service/app/updateApp", params})
}

export const saveApp = (params) => {
  return defHttp.post({ url: "/iam-service/app/saveApp", params})
}


export const deleteApp = (params, handleSuccess) => {
  return defHttp.delete({url: "/iam-service/app/deleteApp", data: params}, {joinParamsToUrl: true}).then(() => {
    handleSuccess();
  });
}

